/**
 * Created by fangshufeng on 2017/12/18.
 */

var express = require('express');
var router = express.Router();
var fs = require('fs');


let PATH = './public/data/'
/* GET */
router.get('/', function(req, res, next) {
    let subPath =  'requestApi';

    fs.readFile(PATH + subPath + '.json',function (err,data) {
        if(err){
            return  res.send(null);
        }
        let jsonData = JSON.parse(data.toString());
        res.send(jsonData);
    });
});


module.exports = router;
